define("admin/plugins/aliyunsms-verify", ["settings"], function(Settings) {
  "use strict";
  /* globals $, app, socket, require */

  var ACP = {};

  ACP.init = function() {
    Settings.load("aliyunsms-verify", $(".aliyunsms-verify-settings"));

    $("#save").on("click", function() {
      Settings.save(
        "aliyunsms-verify",
        $(".aliyunsms-verify-settings"),
        function() {
          app.alert({
            type: "success",
            alert_id: "aliyunsms-verify-saved",
            title: "Settings Saved",
            message: "Please reload your NodeBB to apply these settings",
            clickfn: function() {
              socket.emit("admin.reload");
            }
          });
        }
      );
    });
  };

  return ACP;
});
